package teacher.action.student;
import com.opensymphony.xwork2.ActionSupport;

import teacher.bean.Students;
import teacher.service.student;
import teacher.bean.Stuproject;

public class addStuPro extends ActionSupport{

	private static final long serialVersionUID = 1L;
	private Stuproject stuproject=new Stuproject();
	private int stuId2;
	String suc;

	public String getSuc() {
		return suc;
	}

	public void setSuc(String suc) {
		this.suc = suc;
	}

	public int getStuId2() {
		return stuId2;
	}

	public void setStuId2(int stuId2) {
		this.stuId2 = stuId2;
	}

	public Stuproject getStuproject() {
		return stuproject;
	}

	public void setStuproject(Stuproject stuproject) {
		this.stuproject = stuproject;
	}

	public String execute() throws Exception{
		stuproject.setStuId(stuId2);
		if(new student().insertStuPro(stuproject)){
			this.setSuc("success");
		return SUCCESS;
		}else{
			return ERROR;
		}
	}

}
